package artid.com.arttogo.bean;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

import java.util.Map;

/**
 * Created by 熊彬
 */
// Table注解指定了这个Bean类对应的数据表
@Table(name = "CatalogueBean")
public class CatalogueBean {
	// Column注解指明了这个属性在数据表中状态
	@Column(name = "id", isId = true)
	private int id;
	@Column(name = "name")
	private String name;
	@Column(name = "title")
	private String title;
	@Column(name = "info")
	private String info;
	@Column(name = "imgurl")
	private String imgurl;
	@Column(name = "htmlurl")
	private String htmlurl;
	@Column(name = "zipurl")
	private String zipurl;
	@Column(name = "localurl")
	private String localurl;
	@Column(name = "progress")
	private String progress;
	@Column(name = "size")
	private String size;
	@Column(name = "onload")
	private boolean onload;

	public CatalogueBean() {
	}

	public CatalogueBean(Map<String, String> map) {

		this.name = map.get("name");
		this.title = map.get("title");
		this.info = map.get("info");
		this.imgurl = map.get("imgurl");
		this.htmlurl = map.get("htmlurl");
		this.zipurl = map.get("zipurl");
		this.progress = map.get("progress");
		this.localurl = map.get("localurl");
		this.size = map.get("size");
		onload = false;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getProgress() {
		return progress;
	}

	public void setProgress(String progress) {
		this.progress = progress;
	}

	public String getLocalurl() {
		return localurl;
	}

	public void setLocalurl(String localurl) {
		this.localurl = localurl;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getImgurl() {
		return imgurl;
	}

	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}

	public String getHtmlurl() {
		return htmlurl;
	}

	public void setHtmlurl(String htmlurl) {
		this.htmlurl = htmlurl;
	}

	public String getZipurl() {
		return zipurl;
	}

	public void setZipurl(String zipurl) {
		this.zipurl = zipurl;
	}

	public boolean isOnload() {
		return onload;
	}

	public void setOnload(boolean onload) {
		this.onload = onload;
	}

	@Override
	public String toString() {
		return "CatalogueBean [id=" + id + ", name=" + name + ", title="
				+ title + ", info=" + info + ", imgurl=" + imgurl
				+ ", htmlurl=" + htmlurl + ", zipurl=" + zipurl + ", localurl="
				+ localurl + ", progress=" + progress + ", onload=" + onload
				+ "]";
	}
}